package com.ywu.bpmn.form.service.data;

import com.ywu.bpmn.form.service.dto.YwuFormFieldDto;
import com.ywu.bpmn.form.service.dto.YwuFormInstanceDto;
import com.ywu.bpmn.form.service.entity.YwuFormInstanceConditionEntity;
import com.ywu.bpmn.form.service.entity.YwuFormInstanceEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface YwuFormInstanceRepository {
    void insert(@Param("model") YwuFormInstanceEntity entity);

    void update(@Param("model") YwuFormInstanceEntity entity);

    void delete(@Param("model") YwuFormInstanceEntity entity);

    YwuFormInstanceEntity getEntity(@Param("model") YwuFormInstanceEntity entity, @Param("list") List<YwuFormFieldDto> extendFormFieldList);

    int queryCount(@Param("model") YwuFormInstanceDto dto, @Param("list") List<YwuFormFieldDto> extendFormFieldList);

    List<YwuFormInstanceEntity> queryPageList(@Param("model") YwuFormInstanceDto dto, @Param("list") List<YwuFormFieldDto> extendFormFieldList);

    List<YwuFormInstanceEntity> queryInstanceListByField(@Param("model") YwuFormInstanceDto dto, @Param("list") List<YwuFormFieldDto> extendFormFieldList);

    void insertCondition(@Param("model") YwuFormInstanceConditionEntity entity);

    void deleteCondition(@Param("model") YwuFormInstanceConditionEntity entity);

    YwuFormInstanceConditionEntity getConditionEntity(@Param("model") YwuFormInstanceConditionEntity entity);
}
